package org.example.pojo;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class EmailPromotionParam {

    private static final long serialVersionUID = 1L;
    //推广人id
    @NotNull(message = "推广人id不能为空")
    private String openid;
    //推广项目id
    @NotNull(message = "项目id不能为空")
    private Integer projectId;
    //学校专业id集合
    @NotNull(message = "学校专业id集合不能为空")
    private PromotionArrayObject[] promotionArrayObject;


    @Data
    static class PromotionArrayObject {
        //学校
        @Min(value = 0, message = "学校id不能小于1")
        private Integer school;
        //学校专业id
        @Min(value = 0, message = "学校专业id不能小于1")
        private Integer schoolMajor;
    }

}
